package cn.youwan.market.content;

import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.AvoidXfermode.Mode;

public class ContentData {

	// SharedPreferences 中保存的数据
	private static final String LOCALFILE = "youwanmarket";

	public static final String KEY_FIRST_OPEN = "first_enter";

	// ---------------- 首次打开--------------------------
	public static void saveFirstOpen(Context context) {
		SharedPreferences sp = context.getSharedPreferences(LOCALFILE,Context.MODE_PRIVATE);
		sp.edit().putBoolean(KEY_FIRST_OPEN,false).commit();
	}

	public static boolean isFirstOpen(Context context) {
		SharedPreferences sp = context.getSharedPreferences(LOCALFILE,Context.MODE_PRIVATE);
		return sp.getBoolean(KEY_FIRST_OPEN,true);
	}
}
